package org.example.hw.dto.link;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.example.hw.model.Link.Visibility;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.URL;

public class EditLinkDto {

	@NotBlank
	@URL
	private String originalUrl;

	@NotBlank
	private String customUrl;

	private Visibility visibility = Visibility.PRIVATE;

	public EditLinkDto() {

	}

	public String getOriginalUrl() {
		return originalUrl;
	}

	public void setOriginalUrl(String originalUrl) {
		this.originalUrl = originalUrl;
	}

	public String getCustomUrl() {
		return customUrl;
	}

	public void setCustomUrl(String customUrl) {
		this.customUrl = customUrl;
	}

	public Visibility getVisibility() {
		return visibility;
	}

	public void setVisibility(Visibility visibility) {
		this.visibility = visibility;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
				append("originalUrl", originalUrl).
				append("customUrl", customUrl).
				append("visibility", visibility).
				toString();
	}
}
